import { createSlice } from '@reduxjs/toolkit'

export const homes = createSlice({
  name: 'home',
  initialState:{
    start:'北京',
    end:'三亚',
    data:'2025-3-14',
  },
  reducers: {

    setStart:(state,action)=>{
        state.start=action.payload
    },
    setEnd:(state,action)=>{
        state.end=action.payload
    },
    setData:(state,action)=>{
        state.data=action.payload
    }
    
    
  },
})


export const { setStart, setEnd, setData} = homes.actions